setCMYKProfileFromData

Makes the ICC profile in data the CMYK profile of the document.

Works like setCMYKProfile, but the change is in effect when the call returns. The engine keeps one buffer per distinct profile for its lifetime. SceneApi.saveToString stores this profile as a buffer:// URI that only this engine can read. Save to an archive to keep the profile bytes with the scene.

Throws with COLOR.PROFILE_INVALID or COLOR.PROFILE_UNSUPPORTED_SPACE when the bytes are not a usable profile, and COLOR.PROFILE_DATA_SPACE_MISMATCH when the profile is not CMYK. The previous profile then stays in effect.

Parameters

data

the bytes of a CMYK ICC profile. Must be a direct buffer.